<template>
  <ul>
    <li v-for="item in list" :key="item.id" @click="$router.push('/detail/'+item.id)">
      <div><img :src="item.image" alt=""></div>
<div  class="van-multi-ellipsis--l2" >{{ item.title }}</div>
<div>{{ item.price}}</div>
    </li>
  </ul>
</template>

<script setup>
 import {ref,onMounted} from 'vue'
 import request from '@/tool/request'
 const list=ref([])
 const pagination=ref(1)
//  , pageNUm
 onMounted(()=>{
request.get('/list',{
  params:{
    pagination:pagination.value,
    pageNUm:40
  }
}).then(res=>{
  if(res.data.code==200){
    list.value=res.data.data
  }
})
 })
</script>

<style lang="scss" scoped>
ul{
  column-count: 2;
  column-gap: 10px;
  li{
    break-inside: avoid;
  }
}
</style>